Skip to content

Use apply-refact 0.12.0 #3469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 2, 2023
Merged

Use apply-refact 0.12.0 #3469

merged 2 commits into from
Feb 2, 2023

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Jan 27, 2023

Fixes #3241 by upgrading to apply-refact 0.12.0 for compatible GHC versions. Other GHC versions are not affected.

@fendor fendor requested a review from eddiemundo as a code owner January 27, 2023 09:51
@@ -609,7 +601,7 @@ applyHint recorder ide nfp mhint =
(anns', modu') <-
ExceptT $ mapM (uncurry Refact.applyFixities)
$ postParseTransform (Right (anns, [], dflags, modu)) rigidLayout
liftIO $ (Right <$> withRuntimeLibdir (Refact.applyRefactorings' position commands anns' modu'))
liftIO $ (Right <$> Refact.applyRefactorings' position commands anns' modu')
Copy link
Collaborator Author

@fendor fendor Jan 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is curious, this code-path is definitely not exercised for GHC >= 9.2, since the API in apply-refact has changed in 0.11.0. Additionally, I don't think we need the hack withRuntimeLibdir here because the libdir is only needed for parsing and we pass in a module already.

@fendor
Copy link
Collaborator Author

fendor commented Jan 27, 2023

PR breaks because of tweag/ormolu#981

@fendor fendor force-pushed the fix/3241 branch 6 times, most recently from 78b66ce to d3508f3 Compare February 2, 2023 10:19
@fendor fendor requested a review from georgefst as a code owner February 2, 2023 10:19
@fendor fendor added the merge me Label to trigger pull request merge label Feb 2, 2023
@mergify mergify bot merged commit 065957e into haskell:master Feb 2, 2023
wz1000 pushed a commit that referenced this pull request Feb 9, 2023
* Use apply-refact 0.12.0

* Limit ormolu version to < 0.5.3

(cherry picked from commit 065957e)
wz1000 pushed a commit that referenced this pull request Mar 14, 2023
* Use apply-refact 0.12.0

* Limit ormolu version to < 0.5.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HLS suggests quick fixes but cannot apply them
5 participants